package com.example.zjx8969.myapplication.database;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.OutputStream;

public class EnhanceObjectOutPutStream extends ObjectOutputStream {
    public EnhanceObjectOutPutStream(OutputStream out) throws IOException {
        super(out);
    }

    @Override
    public void writeUTF(String str) throws IOException {
        writeByte(str == null ? 0 : 1);
        if (str != null) {
            super.writeUTF(str);
        }
    }
}
